<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="number" name="displaysort" class="layui-input" placeholder="请输入分类排序" value="0">
                <tip>数字越大，排名越靠前,如果为空，默认排序方式为创建时间</tip>
            </div>

        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" class="layui-input" lay-verify="required" placeholder="请输入商品标题" value="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品分类</label>
            <div class="layui-input-block">
                <select name="cate_id" lay-verify="required">
                    <option value="">选择商品分类</option>
                    {foreach name="cats" item="val"}
                    <option value="{$val.id}">{$val.title}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属商家</label>
            <div class="layui-input-block">
                <select name="manager_id" lay-verify="required">
                    <option value="">选择商品分类</option>
                    {foreach name="manager" item="val"}
                    <option value="{$val.id}">{$val.title}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">标题描述</label>
            <div class="layui-input-block">
                <input type="text" name="short_title" class="layui-input" lay-verify="required" placeholder="请输入商品标题" value="">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label required">商品封面</label>
            <div class="layui-input-block layuimini-upload">
                <input name="logo" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传商品封面" value="">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="logo" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_logo" data-upload-select="logo" data-upload-number="one" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
                <tip>建议图片尺寸：750*750</tip>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label required">商品图片</label>
            <div class="layui-input-block layuimini-upload">
                <input name="thumb" class="layui-input layui-col-xs6" lay-verify="required" placeholder="请上传商品图片" value="">
                <div class="layuimini-upload-btn">
                    <span><a class="layui-btn" data-upload="thumb" data-upload-number="more" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>
                    <span><a class="layui-btn layui-btn-normal" id="select_thumb" data-upload-select="thumb" data-upload-number="more" data-upload-mimetype="image/*"><i class="fa fa-list"></i> 选择</a></span>
                </div>
                <tip>建议图片尺寸：750*300</tip>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">拼团价</label>
            <div class="layui-input-block">
                <input type="text" name="groupsprice" class="layui-input" lay-verify="required" placeholder="请输入拼团价" value="0">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">原价</label>
            <div class="layui-input-block">
                <input type="text" name="price" class="layui-input" lay-verify="required" placeholder="请输入原价" value="0">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">单购价</label>
            <div class="layui-input-block">
                <input type="text" name="singleprice" class="layui-input" lay-verify="required" placeholder="请输入单购价" value="0">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">库存</label>
            <div class="layui-input-block">
                <input type="text" name="stock" class="layui-input" lay-verify="required" placeholder="请输入库存" value="0">
                <tip>该库存会根据用户购买递减</tip>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">总库存</label>
            <div class="layui-input-block">
                <input type="text" name="total_stock" class="layui-input" lay-verify="required" placeholder="请输入总库存" value="0">
                <tip>该库存将不会改变，只做业务逻辑处理</tip>
            </div>
        </div>
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">佣金返利</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="commission" class="layui-input"  placeholder="默认0 不返佣" value="0">-->
<!--            </div>-->
<!--        </div>-->
        <div class="layui-form-item">
            <label class="layui-form-label">开团人数</label>
            <div class="layui-input-block">
                <input type="number" name="groupnum" class="layui-input" lay-verify="required" placeholder="开团人数" value="0">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-form-item">
                <label class="layui-form-label">拼团结束时间</label>
                <div class="layui-input-block">
                    <input type="text" name="endtime" data-date="" data-date-type="datetime" class="layui-input"  placeholder="请选择拼团结束时间" value="">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">运费设置</label>
            <div class="layui-input-block">
                <input type="number" name="freight" class="layui-input" lay-verify="required" placeholder="开团人数" value="0">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">产品参数</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea" placeholder="请输入产品参数"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">拼团说明</label>
            <div class="layui-input-block">
                <textarea name="groupdesc" class="layui-textarea" placeholder="请输入产品参数"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商品描述</label>
            <div class="layui-input-block">
                <textarea name="content" rows="20" class="layui-textarea editor" placeholder="请输入商品描述"></textarea>
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>
